<template>
  <div>
    <div class="headers">
      <div class="cards">
        <div class="cards-header">
          <div class="cards-header-img">
            <img src="../../assets/login.png" alt="" />
          </div>
          <div class="cards-header-content">
            <!-- <h6>树叶李</h6> -->
            <!-- <span>质胜于华，而行胜于言于高山之巅，方可见大河奔流于群巅之上</span> -->
            <router-link to="/enter" @click="identify"
              ><h6>{{ condition }}</h6></router-link
            >
            <span>{{ condTxt }}</span>
          </div>
        </div>
        <div class="cards-footer">
          <h5>我的资料</h5>
          <div class="cards-footer-card">
            <a @click="modify" class="a1"><span>立即完善</span></a>
            <!--  <a href="" class="a1" @click="aModify()"><span>立即完善</span></a> -->
            <a class="a2" href=""><span>本科</span></a>
            <a class="a3" href=""><span>设计师</span></a>
            <a class="a4" href=""
              ><img src="../../assets/write.png" alt=""
            /></a>
          </div>
          <div class="setBack">
            <router-link to="/setlogin"
              ><img src="../../assets/setback.png" alt=""
            /></router-link>
          </div>
        </div>
      </div>
      <div class="scard">
        <div class="scard-box">
          <img src="../../assets/star.png" alt="" /><span>x{{ count1 }}</span>
          <p>我关注的</p>
        </div>
        <div class="scard-box">
          <img src="../../assets/love.png" alt="" /><span>x{{ count2 }}</span>
          <p>我点赞的</p>
        </div>
        <div class="scard-box">
          <img src="../../assets/message.png" alt="" /><span
            >x{{ count3 }}</span
          >
          <p>我做过的</p>
        </div>
      </div>
    </div>
    <div class="contents">
      <div class="contents_item">
        <div class="cont-item-title">
          <p>我的投递</p>
          <router-link class="a5" to="/modify">完善简历 > </router-link>
        </div>
        <div class="cont-item-bigBox">
          <!--  <router-link class="cont-item-box" to="/enlist"> 
            <img src="" alt="">
            <p>已报名</p>
          </router-link> -->
          <div class="cont-item-box">
            <a @click="eBaoming">
              <img src="../../assets/v4.png" alt="" />
              <p>已报名</p>
            </a>
          </div>
          <div class="cont-item-box">
            <a @click="eLuyong">
              <img src="../../assets/v2.png" alt="" />
              <p>已录用</p>
            </a>
          </div>
          <div class="cont-item-box">
            <a @click="eDaogang">
              <img src="../../assets/v1.png" alt="" />
              <p>已到岗</p>
            </a>
          </div>
          <div class="cont-item-box">
            <a @click="eJiesuan">
              <img src="../../assets/v3.png" alt="" />
              <p>已完成</p>
            </a>
          </div>
        </div>
        <div class="cont-item-select">
          <ul>
            <li>
              <img src="../../assets/01.png" alt="" /><a @click="jiLu"
                ><span>报名记录</span></a
              >
            </li>
            <li>
              <img src="../../assets/02.png" alt="" />
              <a @click="qiuZhi"><span>求职意向</span></a>
            </li>
            <li>
              <img src="../../assets/03.png" alt="" />
              <a @click="shouCang"><span>我的收藏</span></a>
            </li>
            <li>
              <img src="../../assets/04.png" alt="" />
              <a @click="qianBao"><span>我的钱包</span></a>
            </li>
            <li>
              <img src="../../assets/05.png" alt="" />
              <a @click="kaJuan"><span>兼职卡卷</span></a>
            </li>
            <li>
              <img src="../../assets/06.png" alt="" />
              <a @click="jiFen"><span>积分换好礼</span></a>
            </li>
          </ul>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { limit } from "../../utils/fn";
export default {
  data() {
    return {
      condition: "",
      condTxt: "",
      count1: "",
      count2: "",
      count3: "",
    };
  },
  created() {
    /*  axios.get("http://1.117.229.207:8082/api/data/querydata.do").then((res) => {
      console.log(res);
    }); */
    if (sessionStorage.getItem("uid")) {
      let uid = sessionStorage.getItem("uid");
      console.log(uid);
      this.condition = uid;
      this.condTxt = "登录成功，快去完善你的资料吧";
      this.count1 = "13";
      this.count2 = "24";
      this.count3 = "66";
    } else {
      this.condition = "未登录";
      this.condTxt = "你还没有登录，请先登录";
      this.count1 = "0";
      this.count2 = "0";
      this.count3 = "0";
    }
  },
  methods: {
    identify() {
      if (sessionStorage.getItem("uid")) {
        sessionStorage.getItem("uid");
        this.condition = uid;
      } else {
        this.router.push("/enter");
      }
    },
    eBaoming() {
      limit("/enlist/ebaoming", "请先登录后查看我的报名");
    },
    eLuyong() {
      limit("/enlist/eluyong", "请先登录后查看");
    },
    eDaogang() {
      limit("/enlist/edaogang", "请先登录后查看");
    },
    eJiesuan() {
      limit("/enlist/ejiesuan", "请先登录后查看");
    },
    jiLu() {
      limit("/enlist", "请先登录后查看");
    },
    qiuZhi() {
      limit("/qiuzhi", "请先登录后查看");
    },
    shouCang() {
      limit("/shoucang", "请先登录后查看收藏");
    },
    qianBao() {
      limit("/qianbao", "请先登录后查看钱包");
    },
    kaJuan() {
      limit("/kajuan", "请先登录后查看卡卷");
    },
    jiFen() {
      limit("/jifen", "请先登录后查看积分");
    },
    modify() {
      limit("/modify", "请先登录后编辑");
    },
  },

  /*   mounted() {
    console.log(this.$store.state);
  }, */
};
</script>

<style>
.headers {
  display: block;
  height: 494px;
  background-color: #fdd438;
  padding-top: 150px;
  border-radius: 20px 20px 0 0;
}
.cards {
  height: 346px;
  background-color: #fefcf4;
  margin: 0 40px;
  border-radius: 20px;
  padding: 40px 40px;
  position: relative;
}
.setBack {
  position: absolute;
  top: 27px;
  right: 27px;
}
.setBack img {
  width: 50px;
  height: 50px;
}
.cards-header {
  height: 210px;
}
.cards-header-img {
  float: left;
}
.cards-header-img img {
  width: 174px;
  height: 174px;
  border-radius: 100px;
}
.cards-header-content {
  float: left;
  width: 350px;
  margin-left: 36px;
}
.cards-header-content h6 {
  font-size: 30px;
  font-family: PingFang SC;
  font-weight: 600;
  color: #000000;
  line-height: 81px;
}
.cards-header-content span {
  font-size: 24px;
  font-family: PingFang SC;
  font-weight: 400;
  color: #817f81;
  line-height: 36px;
}
.cards-footer {
  height: 120px;
}
.cards-footer h5 {
  font-size: 26px;
  font-family: PingFang SC;
  font-weight: 500;
  color: #000000;
  padding-left: 40px;
}
.cards-footer-card {
  height: 72px;
  margin-top: 15px;
}
.cards-footer-card span {
  font-size: 24px;
  font-family: PingFang SC;
  font-weight: 500;
  color: #ffffff;
  line-height: 72px;
}
.cards-footer-card .a1 {
  width: 176px;
  height: 72px;
  border-radius: 30px;
  background-color: #fdd438;
  padding: 10px 20px;
  margin-left: 20px;
}
.cards-footer-card .a2 {
  width: 124px;
  height: 72px;
  border-radius: 30px;
  background-color: #02dbd3;
  padding: 10px 30px;
  margin-left: 20px;
}
.cards-footer-card .a3 {
  width: 176px;
  height: 72px;
  border-radius: 30px;
  background-color: #fc3753;
  padding: 10px 30px;
  margin-left: 20px;
}
.cards-footer-card .a4 {
  float: right;
}
.cards-footer-card img {
  width: 64px;
  height: 62px;
  margin-top: 8px;
  margin-right: 10px;
}
.scard {
  width: 674px;
  margin: 0 40px;
  border-radius: 20px;
  height: 160px;
  background-color: #fefcf4;
  position: absolute;
  left: 0;
  top: 586px;
  box-shadow: 0px 10px 10px -5px gainsboro;
  display: flex;
  justify-content: space-around;
  align-items: center;
}
.scard p {
  font-size: 18px;
  font-family: PingFang SC;
  font-weight: 400;
  color: #000000;
}
.scard-box {
  width: 100px;
  height: 74px;
}
.scard-box img {
  width: 41px;
  height: 41px;
}
.contents {
  width: 100%;
  height: 714px;
  margin-top: 120px;
}
.contents_item {
  /*  width: 674px; */
  height: 714px;
  margin: 0 40px;
  background-color: #fefefe;
}
.cont-item-title {
  height: 58px;
}
.cont-item-title p {
  font-size: 32px;
  font-family: PingFang SC;
  font-weight: 500;
  color: #010101;
  line-height: 58px;
  float: left;
  margin-left: 30px;
}
.cont-item-title .a5 {
  float: right;
  font-size: 26px;
  font-family: PingFang SC;
  font-weight: 400;
  color: #b8b7b7;
  line-height: 58px;
}
.cont-item-bigBox {
  height: 190px;
  display: flex;
  justify-content: space-around;
}
.cont-item-box {
  width: 130px;
  height: 160px;
  text-align: center;
}
.cont-item-box img {
  width: 130px;
  height: 130px;
}
.cont-item-box p {
  font-size: 24px;
  font-family: PingFang SC;
  font-weight: 500;
  color: #9c9c9c;
  line-height: 50px;
}
.cont-item-select {
  padding: 20px 20px;
}
.cont-item-select img {
  width: 26px;
  height: 26px;
  margin-left: 20px;
}
.cont-item-select span {
  font-size: 26px;
  font-family: PingFang SC;
  font-weight: 500;
  color: #000000;
  line-height: 80px;
  padding-left: 50px;
  font-weight: bold;
}
</style>
